﻿using com.superscene.ui;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace parkMonitor.view.util {
	/// <summary></summary>
	public class ImageMenu : ItemsControl {
		static ImageMenu() {
			DefaultStyleKeyProperty.OverrideMetadata(typeof(ImageMenu), new FrameworkPropertyMetadata(typeof(ImageMenu)));
		}

		public ImageMenu() {
			CmdClickScaleBtn = new SupRelayCommand(new Action(onClickScaleBtn));
		}

		//IsSmall
		public static readonly DependencyProperty IsSmallPro = DependencyProperty.Register("IsSmall", typeof(bool), typeof(ImageMenu), new PropertyMetadata(false));
		public bool IsSmall {
			get { return (bool)GetValue(IsSmallPro); }
			set { SetCurrentValue(IsSmallPro, value); }
		}

		//NormalHeight
		public static readonly DependencyProperty NormalHeightPro = DependencyProperty.Register("NormalHeight", typeof(double), typeof(ImageMenu), new PropertyMetadata(70.0));
		public double NormalHeight {
			get { return (double)GetValue(NormalHeightPro); }
			set { SetCurrentValue(NormalHeightPro, value); }
		}

		//SmallHeight
		public static readonly DependencyProperty SmallHeightPro = DependencyProperty.Register("SmallHeight", typeof(double), typeof(ImageMenu), new PropertyMetadata(25.0));
		public double SmallHeight {
			get { return (double)GetValue(SmallHeightPro); }
			set { SetCurrentValue(SmallHeightPro, value); }
		}

		public static readonly DependencyProperty CmdClickScaleBtnProperty = DependencyProperty.Register("CmdClickScaleBtn", typeof(ICommand), typeof(ImageMenu));
		public ICommand CmdClickScaleBtn {
			get { return (ICommand)GetValue(CmdClickScaleBtnProperty); }
			set { SetValue(CmdClickScaleBtnProperty, value); }
		}

		private void onClickScaleBtn() {
			IsSmall = !IsSmall;
		}

	}
}
